{% extends "profilebase.html" %}


{% block sidebar2 %}
	{% if profileOwner %}
		<label style="font-weight:bold;font-size:160%">REQUESTS</label>
	{% endif %}


	{% if profileOwner %}
		<br/><br/><label style="font-weight:bold;font-size:150%">Friend Requests</label><br/><br/>
	
		{% for fr, photo in friendRequests %}
			
			<label style="font-weight:bold;font-size:150%"><a href="/myprofile/{{ fr.sender.id }}/"><img  hight="100" width="100" border="0" src={{ photo.path }} />  <b style="vertical-align:top">{{ fr.sender }}</b></a></label><br/>
			
			<a href="/myprofile/acceptFriend/{{ fr.sender.id }}/">accept</a> |
			<a href="/myprofile/rejectFriend/{{ fr.sender.id }}/">reject</a><br/><br/>
			
		{% empty %}	
			<small>You have no friend requests yet</small>
		{% endfor %}
	
		{% if currentUser.category != 'student' %}	
			<br/><br/><label style="font-weight:bold;font-size:150%">Employment Requests</label><br/><br/>
			{% for er, photo in employmentRequests %}
				<label style="font-weight:bold;font-size:150%"><a href="/myprofile/{{ er.sender.id }}/"><img  hight="100" width="100" border="0" src={{ photo.path }} />  <b style="vertical-align:top">{{ er.sender }}</b></a></label>
				
				<a href="/myprofile/acceptEmployment/{{ er.sender.id }}/">accept</a> |
				<a href="/myprofile/rejectEmployment/{{ er.sender.id }}/">reject</a><br/><br/>
			{% empty %}
				<small>You have no employment requests yet</small>
			{% endfor %}

		{% endif %}
	{% endif %}
{% endblock %}

{% block content %}

	<div style="font-size:30;"><b><a href="/myprofile/{{ currentUser.abstract_user.id }}/">{{ currentUser.abstract_user }}'s</a> Connections</b></div><br/>

	{% if currentUser.category != "student" %}
		<label style="font-weight:bold;font-size:150%">Employment</label><br/><br/>
		{% for emp, photo  in employment %}
			<a href="/myprofile/{{ emp.abstract_user.id }}/">
				<img style="max-width:100px;max-height:100px" border="0" src={{ photo.path }} />  
				<br/><font style="vertical-align:top">
					{{ emp.abstract_user }}
					{% if currentUser.category == "institute" %}
						<br/>
						<small>Teaches: {{ emp.teaches }}</small>
					{% endif %}
				</font>
			</a><br/>

			<br/><br/>

		{% empty %}
			{% if profileOwner %}
				You have no connections yet.
			{% else %}
				{{ currentUser.abstract_user }} has no connections yet.
			{% endif %}
		{% endfor %}
	{% endif %}

	<br/><br/>

	<label style="font-weight:bold;font-size:150%">Friends</label><br/><br/>
	{% for friend, photo in friends %}
		<a href="/myprofile/{{ friend.id }}/">
			<img style="max-width:100px;max-height:100px" border="0" src={{ photo.path }} />    
			<font style="vertical-align:top">
				<br/>{{ friend }}<br/>
				{% if friend.jamming_style %}
					<small>Jamming Style: {{ friend.jamming_style }}</small>
				{% endif %}
			</font>
		</a><br/><br/><br/>
	{% empty %}
		{% if profileOwner %}
			You have no connections yet.
		{% else %}
			{{ currentUser.abstract_user }} has no connections yet.
		{% endif %}
	{% endfor %}
	
{% endblock %}
